import ajax from '@/utils/ajax'
import dialog from '@/utils/dialog'

export default function (query) {
  return ajax({
    url: `/f/childKnowledge/list`,
    barLoading: true,
    data: query
  }).then(data => {
    if (data && data[0]) {
      return data[0]
    } else {
      throw '未获取到育儿知识信息'
    }
  }).catch(msg => dialog.showToast(msg))
}
